package com.lgh.jfinal.base;

import java.util.List;

import com.lgh.util.StrUtils;


/**
 * baseForm 表单参数
 * @author 梁桂花
 *
 * 2018年11月28日
 */
public class BaseForm {

	private Paginator paginator;
	private String orderColumn;
	private String orderAsc;
	private boolean showCondition;


	/**
	 * 设置Where条件
	 */
	public void setWhere() {
	}

	/**
	 * 设置Where条件
	 * 
	 * @param where
	 */
	public void setWhere(List<Object> where) {
	}

	public boolean isShowCondition() {
		return showCondition;
	}

	public void setShowCondition(boolean showCondition) {
		this.showCondition = showCondition;
	}

	public Paginator getPaginator() {
		return paginator;
	}

	public void setPaginator(Paginator paginator) {
		this.paginator = paginator;
	}

	public String getOrderBy() {
		if (StrUtils.isEmpty(getOrderColumn())) {
			return "";
		}
		return " " + getOrderColumn() + " " + getOrderAsc() + " ";
	}

	public String getOrderColumn() {
		return orderColumn;
	}

	public void setOrderColumn(String orderColumn) {
		this.orderColumn = orderColumn;
	}

	public String getOrderAsc() {
		return orderAsc;
	}

	public void setOrderAsc(String orderAsc) {
		this.orderAsc = orderAsc;
	}

}
